<?php
$widget_params = isset($widget_params) ? $widget_params : [];
$choice_code_name = \Illuminate\Support\Arr::get($widget_params, 'name', 'role_tag');
$choice_showAll = \Illuminate\Support\Arr::get($widget_params, 'showAll', true);
$choice_value = \Illuminate\Support\Arr::get($widget_params, 'value', '');
$lis = \App\Facade\Role::lis();
?>

<select name="{{$choice_code_name}}" id="{{$choice_code_name}}" class="form-control" lay-filter="{{$choice_code_name}}">
    @if($choice_showAll)
        <option value="">{{$choice_showAll===true?'全部':$choice_showAll}}</option>
    @endif
    @foreach($lis as $item)
        <option value="{{$item->tag}}"
                @if($item->tag==$choice_value) selected @endif>{{$item->name}}</option>
    @endforeach
</select>

